﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 客户物资编码适配系统
{
    public partial class frmDetail : Form
    {
        public frmDetail()
        {
            InitializeComponent();
        }

        public void ShowData(DataTable tmpdt)
        {
            dgv1.DataSource = tmpdt;
            dgv1.AutoResizeColumns();
        }

        private void frmDetail_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;
            this.Visible = false ;
        }

        private void frmDetail_VisibleChanged(object sender, EventArgs e)
        {
            if (this.Visible &&dgv1 .Rows.Count >0)
            {
                dgv1.AutoResizeColumns();
            }
        }
    }
}
